package com.elong.spring.locale;

import java.text.DateFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;

public class LocaleTest {

    public static void main(String[] args) {
	Locale locale1 = new Locale("zh", "CN");
	Locale locale2 = new Locale("zh");
	
	Locale locale3 = Locale.CHINA;
	
	Locale local4 = Locale.CHINESE;
	
	Locale local5 = Locale.getDefault();
	
	Locale uslocale = new Locale("en", "US");
	
	NumberFormat currFmt = NumberFormat.getCurrencyInstance(locale1);
	double amt = 123456.78;
	System.out.println(currFmt.format(amt));
	
	Date date = new Date();
	DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, uslocale);
	System.out.println(df.format(date));
    }
}
